<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>家庭成员</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: linear-gradient(135deg, #E8EAF6 0%, #F3E5F5 50%, #FCE4EC 100%);
            min-height: 100vh;
        }

        .glass-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .member-card {
            transition: all 0.3s;
        }

        .member-card:active {
            transform: scale(0.98);
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .animate-slide-up {
            animation: slideUp 0.4s ease-out;
        }

        /* 手机状态栏占位 */
        .status-bar-spacer {
            height: 28px;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            position: relative;
            z-index: 999;
        }
    </style>
</head>

<body>
    <!-- 手机状态栏占位 -->
    <div class="status-bar-spacer"></div>

    <div class="min-h-screen pb-24">
        <!-- 顶部导航 -->
        <div class="glass-card px-5 py-4">
            <div class="flex items-center justify-between">
                <div class="flex items-center gap-3">
                    <button onclick="history.back()"
                        class="w-10 h-10 bg-white rounded-xl flex items-center justify-center shadow-sm">
                        <i class="fas fa-arrow-left text-gray-700"></i>
                    </button>
                    <div>
                        <h1 class="text-lg font-bold text-gray-900">家庭成员</h1>
                        <p class="text-xs text-gray-500">共5位成员</p>
                    </div>
                </div>
                <button
                    class="px-4 py-2 bg-black text-white rounded-xl text-sm font-semibold shadow-lg hover:scale-105 transition-transform">
                    <i class="fas fa-user-plus mr-1"></i> 添加
                </button>
            </div>
        </div>

        <!-- 家庭概览卡片 -->
        <div class="px-5 py-6">
            <div class="glass-card rounded-3xl p-5 shadow-lg mb-6">
                <div class="flex items-center gap-2 mb-4">
                    <div
                        class="w-8 h-8 bg-gradient-to-br from-purple-500 to-pink-500 rounded-xl flex items-center justify-center">
                        <i class="fas fa-chart-bar text-white text-sm"></i>
                    </div>
                    <span class="font-bold text-gray-900">家庭健康概览</span>
                </div>

                <div class="grid grid-cols-3 gap-3">
                    <div class="text-center">
                        <div
                            class="w-14 h-14 mx-auto mb-2 bg-gradient-to-br from-green-400 to-emerald-500 rounded-2xl flex items-center justify-center shadow-lg">
                            <i class="fas fa-pills text-white text-xl"></i>
                        </div>
                        <div class="text-2xl font-bold text-gray-900">48</div>
                        <div class="text-xs text-gray-500">总药品</div>
                    </div>
                    <div class="text-center">
                        <div
                            class="w-14 h-14 mx-auto mb-2 bg-gradient-to-br from-blue-400 to-indigo-500 rounded-2xl flex items-center justify-center shadow-lg">
                            <i class="fas fa-bell text-white text-xl"></i>
                        </div>
                        <div class="text-2xl font-bold text-gray-900">23</div>
                        <div class="text-xs text-gray-500">今日提醒</div>
                    </div>
                    <div class="text-center">
                        <div
                            class="w-14 h-14 mx-auto mb-2 bg-gradient-to-br from-orange-400 to-amber-500 rounded-2xl flex items-center justify-center shadow-lg">
                            <i class="fas fa-percent text-white text-xl"></i>
                        </div>
                        <div class="text-2xl font-bold text-gray-900">92%</div>
                        <div class="text-xs text-gray-500">服药率</div>
                    </div>
                </div>
            </div>

            <!-- 筛选标签 -->
            <div class="flex gap-2 mb-5 overflow-x-auto scrollbar-hide pb-2">
                <button
                    class="px-5 py-2 bg-black text-white rounded-full text-sm font-semibold whitespace-nowrap shadow-lg">
                    全部成员
                </button>
                <button
                    class="px-5 py-2 bg-white text-gray-700 rounded-full text-sm font-semibold whitespace-nowrap shadow-sm">
                    成年人 (3)
                </button>
                <button
                    class="px-5 py-2 bg-white text-gray-700 rounded-full text-sm font-semibold whitespace-nowrap shadow-sm">
                    老人 (2)
                </button>
                <button
                    class="px-5 py-2 bg-white text-gray-700 rounded-full text-sm font-semibold whitespace-nowrap shadow-sm">
                    儿童 (0)
                </button>
            </div>

            <!-- 成员列表 -->
            <div class="space-y-3">
                <!-- 我自己 -->
                <div
                    class="member-card animate-slide-up glass-card rounded-3xl p-4 shadow-lg border-l-4 border-purple-500">
                    <div class="flex items-center gap-4">
                        <div class="relative">
                            <div
                                class="w-16 h-16 bg-gradient-to-br from-purple-100 to-pink-100 rounded-2xl flex items-center justify-center shadow-sm">
                                <span class="text-3xl">👨‍⚕️</span>
                            </div>
                            <div
                                class="absolute -bottom-1 -right-1 w-6 h-6 bg-purple-500 rounded-full flex items-center justify-center shadow-md">
                                <i class="fas fa-crown text-white text-xs"></i>
                            </div>
                        </div>
                        <div class="flex-1 min-w-0">
                            <div class="flex items-center gap-2 mb-1">
                                <h3 class="font-bold text-gray-900">我自己</h3>
                                <span
                                    class="px-2 py-0.5 bg-purple-100 text-purple-700 rounded-md text-xs font-semibold">管理员</span>
                            </div>
                            <p class="text-sm text-gray-500 mb-2">30岁 · 男 · 成年人</p>
                            <div class="flex items-center gap-3 text-xs">
                                <div class="flex items-center gap-1">
                                    <i class="fas fa-pills text-green-600"></i>
                                    <span class="text-gray-600">8种药品</span>
                                </div>
                                <div class="flex items-center gap-1">
                                    <i class="fas fa-bell text-orange-600"></i>
                                    <span class="text-gray-600">5个提醒</span>
                                </div>
                            </div>
                        </div>
                        <button
                            class="w-10 h-10 bg-purple-50 text-purple-600 rounded-xl hover:bg-purple-100 transition-colors">
                            <i class="fas fa-chevron-right"></i>
                        </button>
                    </div>
                </div>

                <!-- 妈妈 -->
                <div class="member-card animate-slide-up glass-card rounded-3xl p-4 shadow-lg border-l-4 border-pink-400"
                    style="animation-delay: 0.1s">
                    <div class="flex items-center gap-4">
                        <div
                            class="w-16 h-16 bg-gradient-to-br from-pink-100 to-rose-100 rounded-2xl flex items-center justify-center shadow-sm">
                            <span class="text-3xl">👩</span>
                        </div>
                        <div class="flex-1 min-w-0">
                            <div class="flex items-center gap-2 mb-1">
                                <h3 class="font-bold text-gray-900">妈妈</h3>
                                <span class="px-2 py-0.5 bg-red-100 text-red-700 rounded-md text-xs font-semibold">⚠️
                                    需关注</span>
                            </div>
                            <p class="text-sm text-gray-500 mb-2">58岁 · 女 · 老人</p>
                            <div class="flex items-center gap-3 text-xs">
                                <div class="flex items-center gap-1">
                                    <i class="fas fa-pills text-green-600"></i>
                                    <span class="text-gray-600">12种药品</span>
                                </div>
                                <div class="flex items-center gap-1">
                                    <i class="fas fa-bell text-orange-600"></i>
                                    <span class="text-gray-600">8个提醒</span>
                                </div>
                            </div>
                        </div>
                        <button
                            class="w-10 h-10 bg-pink-50 text-pink-600 rounded-xl hover:bg-pink-100 transition-colors">
                            <i class="fas fa-chevron-right"></i>
                        </button>
                    </div>
                </div>

                <!-- 爸爸 -->
                <div class="member-card animate-slide-up glass-card rounded-3xl p-4 shadow-lg border-l-4 border-blue-400"
                    style="animation-delay: 0.2s">
                    <div class="flex items-center gap-4">
                        <div
                            class="w-16 h-16 bg-gradient-to-br from-blue-100 to-indigo-100 rounded-2xl flex items-center justify-center shadow-sm">
                            <span class="text-3xl">👨</span>
                        </div>
                        <div class="flex-1 min-w-0">
                            <div class="flex items-center gap-2 mb-1">
                                <h3 class="font-bold text-gray-900">爸爸</h3>
                                <span class="px-2 py-0.5 bg-green-100 text-green-700 rounded-md text-xs font-semibold">✓
                                    健康</span>
                            </div>
                            <p class="text-sm text-gray-500 mb-2">62岁 · 男 · 老人</p>
                            <div class="flex items-center gap-3 text-xs">
                                <div class="flex items-center gap-1">
                                    <i class="fas fa-pills text-green-600"></i>
                                    <span class="text-gray-600">10种药品</span>
                                </div>
                                <div class="flex items-center gap-1">
                                    <i class="fas fa-bell text-orange-600"></i>
                                    <span class="text-gray-600">6个提醒</span>
                                </div>
                            </div>
                        </div>
                        <button
                            class="w-10 h-10 bg-blue-50 text-blue-600 rounded-xl hover:bg-blue-100 transition-colors">
                            <i class="fas fa-chevron-right"></i>
                        </button>
                    </div>
                </div>

                <!-- 妻子 -->
                <div class="member-card animate-slide-up glass-card rounded-3xl p-4 shadow-lg border-l-4 border-purple-400"
                    style="animation-delay: 0.3s">
                    <div class="flex items-center gap-4">
                        <div
                            class="w-16 h-16 bg-gradient-to-br from-purple-100 to-pink-100 rounded-2xl flex items-center justify-center shadow-sm">
                            <span class="text-3xl">👩‍🦰</span>
                        </div>
                        <div class="flex-1 min-w-0">
                            <div class="flex items-center gap-2 mb-1">
                                <h3 class="font-bold text-gray-900">妻子</h3>
                                <span class="px-2 py-0.5 bg-green-100 text-green-700 rounded-md text-xs font-semibold">✓
                                    健康</span>
                            </div>
                            <p class="text-sm text-gray-500 mb-2">28岁 · 女 · 成年人</p>
                            <div class="flex items-center gap-3 text-xs">
                                <div class="flex items-center gap-1">
                                    <i class="fas fa-pills text-green-600"></i>
                                    <span class="text-gray-600">5种药品</span>
                                </div>
                                <div class="flex items-center gap-1">
                                    <i class="fas fa-bell text-orange-600"></i>
                                    <span class="text-gray-600">3个提醒</span>
                                </div>
                            </div>
                        </div>
                        <button
                            class="w-10 h-10 bg-purple-50 text-purple-600 rounded-xl hover:bg-purple-100 transition-colors">
                            <i class="fas fa-chevron-right"></i>
                        </button>
                    </div>
                </div>

                <!-- 奶奶 -->
                <div class="member-card animate-slide-up glass-card rounded-3xl p-4 shadow-lg border-l-4 border-orange-400"
                    style="animation-delay: 0.4s">
                    <div class="flex items-center gap-4">
                        <div
                            class="w-16 h-16 bg-gradient-to-br from-orange-100 to-amber-100 rounded-2xl flex items-center justify-center shadow-sm">
                            <span class="text-3xl">👵</span>
                        </div>
                        <div class="flex-1 min-w-0">
                            <div class="flex items-center gap-2 mb-1">
                                <h3 class="font-bold text-gray-900">奶奶</h3>
                                <span
                                    class="px-2 py-0.5 bg-orange-100 text-orange-700 rounded-md text-xs font-semibold">⏰
                                    定期复查</span>
                            </div>
                            <p class="text-sm text-gray-500 mb-2">85岁 · 女 · 老人</p>
                            <div class="flex items-center gap-3 text-xs">
                                <div class="flex items-center gap-1">
                                    <i class="fas fa-pills text-green-600"></i>
                                    <span class="text-gray-600">13种药品</span>
                                </div>
                                <div class="flex items-center gap-1">
                                    <i class="fas fa-bell text-orange-600"></i>
                                    <span class="text-gray-600">11个提醒</span>
                                </div>
                            </div>
                        </div>
                        <button
                            class="w-10 h-10 bg-orange-50 text-orange-600 rounded-xl hover:bg-orange-100 transition-colors">
                            <i class="fas fa-chevron-right"></i>
                        </button>
                    </div>
                </div>
            </div>

            <!-- 健康提示卡片 -->
            <div class="mt-6 glass-card rounded-3xl p-5 shadow-lg bg-gradient-to-br from-blue-50 to-purple-50">
                <div class="flex items-start gap-3">
                    <div
                        class="w-10 h-10 bg-gradient-to-br from-yellow-400 to-orange-500 rounded-xl flex items-center justify-center flex-shrink-0 shadow-lg">
                        <span class="text-xl">💡</span>
                    </div>
                    <div class="flex-1">
                        <h3 class="font-bold text-gray-900 mb-1">家庭健康建议</h3>
                        <p class="text-sm text-gray-600 leading-relaxed mb-3">
                            您的家庭成员中有2位老人需要长期服药，建议设置定时提醒，确保按时按量服药。定期检查药品库存，避免出现缺药情况。
                        </p>
                        <button class="text-sm font-semibold text-purple-600 hover:text-purple-700">
                            查看详细建议 →
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 底部导航 -->
    <div class="fixed bottom-0 left-0 right-0 glass-card px-5 py-3 border-t border-gray-100">
        <div class="flex items-center justify-around">
            <a href="index.html" class="flex flex-col items-center gap-1 text-gray-400">
                <div class="w-12 h-12 bg-white rounded-2xl flex items-center justify-center shadow-sm">
                    <i class="fas fa-home"></i>
                </div>
                <span class="text-xs font-medium">首页</span>
            </a>
            <a href="medicine_management.html" class="flex flex-col items-center gap-1 text-gray-400">
                <div class="w-12 h-12 bg-white rounded-2xl flex items-center justify-center shadow-sm">
                    <i class="fas fa-pills"></i>
                </div>
                <span class="text-xs font-medium">药品</span>
            </a>
            <a href="add_medicine.html" class="flex flex-col items-center gap-1 text-gray-400">
                <div class="w-12 h-12 bg-white rounded-2xl flex items-center justify-center shadow-sm">
                    <i class="fas fa-plus-circle"></i>
                </div>
                <span class="text-xs font-medium">添加</span>
            </a>
            <a href="reminder.html" class="flex flex-col items-center gap-1 text-gray-400">
                <div class="w-12 h-12 bg-white rounded-2xl flex items-center justify-center shadow-sm">
                    <i class="fas fa-bell"></i>
                </div>
                <span class="text-xs font-medium">提醒</span>
            </a>
            <a href="profile.html" class="flex flex-col items-center gap-1 text-purple-600">
                <div
                    class="w-12 h-12 bg-gradient-to-br from-purple-500 to-pink-500 rounded-2xl flex items-center justify-center shadow-lg">
                    <i class="fas fa-user text-white"></i>
                </div>
                <span class="text-xs font-semibold">我的</span>
            </a>
        </div>
    </div>

    <script>
        // 筛选切换
        document.querySelectorAll('button[class*="px-5 py-2"]').forEach(btn => {
            btn.addEventListener('click', function () {
                if (!this.closest('.member-card')) {
                    document.querySelectorAll('button[class*="px-5 py-2"]').forEach(b => {
                        if (!b.closest('.member-card')) {
                            b.classList.remove('bg-black', 'text-white', 'shadow-lg');
                            b.classList.add('bg-white', 'text-gray-700', 'shadow-sm');
                        }
                    });
                    this.classList.remove('bg-white', 'text-gray-700', 'shadow-sm');
                    this.classList.add('bg-black', 'text-white', 'shadow-lg');
                }
            });
        });
    </script>
</body>

</html>